<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="referrer" content="origin" />
    <meta property="og:description" content="markdown公式编辑的常用语法简介。" />
    <meta http-equiv="Cache-Control" content="no-transform" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>Markdown公式编辑学习笔记 - xinet - 博客园</title>
    
    <link rel="stylesheet" href="/css/blog-common.min.css?v=HrvK75b61-WJQPXtn_liCIWUC4EcnwT_lmrRbncieJo" />
    <link id="MainCss" rel="stylesheet" href="/skins/summergarden/bundle-summergarden.min.css?v=X4bFXeVITa4R62KibBcxY9PyNj-MkkV0-IpC8y8yg_Q" />
    
    <link id="mobile-style" media="only screen and (max-width: 767px)" type="text/css" rel="stylesheet" href="/skins/summergarden/bundle-summergarden-mobile.min.css?v=-QJralHuYdZVDw2zivi4j5fUWp9jAHwpSH6TIdmjbwI" />
    
    <link type="application/rss+xml" rel="alternate" href="https://www.cnblogs.com/q735613050/rss" />
    <link type="application/rsd+xml" rel="EditURI" href="https://www.cnblogs.com/q735613050/rsd.xml" />
    <link type="application/wlwmanifest+xml" rel="wlwmanifest" href="https://www.cnblogs.com/q735613050/wlwmanifest.xml" />
    <script src="https://common.cnblogs.com/scripts/jquery-2.2.0.min.js"></script>
    <script src="/js/blog-common.min.js?v=qxe3MTML1_SisOYVwTJTDPxtBSyGjHBAu3qLg57iZ2k"></script>
    <script>
        var currentBlogId = 369629;
        var currentBlogApp = 'q735613050';
        var cb_enable_mathjax = true;
        var isLogined = false;
    </script>
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({
        tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']], processClass: 'math', processEscapes: true },
        TeX: {
        equationNumbers: { autoNumber: ['AMS'], useLabelIds: true },
        extensions: ['extpfeil.js', 'mediawiki-texvc.js'],
        Macros: {bm: "\\boldsymbol"}
        },
        'HTML-CSS': { linebreaks: { automatic: true } },
        SVG: { linebreaks: { automatic: true } }
        });
    </script>
    <script src="https://mathjax.cnblogs.com/2_7_5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
</head>
<body>
<div id="cnblogs_post_body" class="blogpost-body cnblogs-markdown">
    <h1 id="一公式使用参考">一、公式使用参考</h1>
<h2 id="如何插入公式">1．如何插入公式</h2>
<ul>
<li>行中公式(放在文中与其它文字混编)可以用如下方法表示：<code>$ 数学公式 $</code></li>
<li>独立公式可以用如下方法表示：<code>$$ 数学公式 $$</code></li>
<li><p>自动编号的公式可以用如下方法表示：</p>
<blockquote>
<p>若需要手动编号，参见<a href="#jump">大括号和行标的使用</a></p>
</blockquote></li>
</ul>
<pre><code>\begin{equation}
数学公式
\label{eq:当前公式名}
\end{equation}
自动编号后的公式可在全文任意处使用 \eqref{eq:公式名} 语句引用。</code></pre>
<pre><code>例子：
```
$ J_\alpha(x) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \Gamma (m + \alpha + 1)} {\left({ \frac{x}{2} }\right)}^{2m + \alpha} \text {，行内公式示例} $
```
显示：

$ J_\alpha(x) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \Gamma (m + \alpha + 1)} {\left({ \frac{x}{2} }\right)}^{2m + \alpha} \text {，行内公式示例} $            

例子：
 
 ```
$$ J_\alpha(x) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \Gamma (m + \alpha + 1)} {\left({ \frac{x}{2} }\right)}^{2m + \alpha} \text {，独立公式示例} $$
```

显示：

$$ J_\alpha(x) = \sum_{m=0}^\infty \frac{(-1)^m}{m! \Gamma (m + \alpha + 1)} {\left({ \frac{x}{2} }\right)}^{2m + \alpha} \text {，独立公式示例} $$</code></pre>
<h2 id="如何输入上下标">2．如何输入上下标</h2>
<p><code>^</code>表示上标, <code>_</code> 表示下标。如果上下标的内容多于一个字符，需要用 <code>{}</code>将这些内容括成一个整体。上下标可以嵌套，也可以同时使用。<br />
例子：<br />
<code>$$ x^{y^z}=(1+{\rm e}^x)^{-2xy^w} $$</code><br />
显示：</p>
<p><span class="math display">\[ x^{y^z}=(1+{\rm e}^x)^{-2xy^w} \]</span></p>
<p>另外，如果要在左右两边都有上下标，可以用<code>\sideset</code> 命令</p>
<ul>
<li>例子：<br />
<code>$$ \sideset{^1_2}{^3_4}\bigotimes $$</code></li>
<li>显示：</li>
</ul>
<p><span class="math display">\[ \sideset{^1_2}{^3_4}\bigotimes \]</span></p>
<h2 id="如何输入括号和分隔符">3．如何输入括号和分隔符</h2>
<p><code>()</code>、<code>[]</code>和<code>|</code>表示符号本身，使用 <code>\{\}</code> 来表示 <code>{}</code>。当要显示大号的括号或分隔符时，要用 <code>\left</code> 和 <code>\right</code> 命令。<br />
一些特殊的括号：</p>
<table>
<thead>
<tr class="header">
<th style="text-align: center;">输入</th>
<th style="text-align: center;">显示</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><code>$$\langle表达式\rangle$$</code></td>
<td style="text-align: center;"><span class="math display">\[\langle表达式 \rangle\]</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$$\lceil表达式\rceil$$</code></td>
<td style="text-align: center;"><span class="math display">\[\lceil表达式 \rceil\]</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$$\lfloor表达式\rfloor$$</code></td>
<td style="text-align: center;"><span class="math display">\[\lfloor表达式 \rfloor\]</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$$\lbrace表达式\rbrace$$</code></td>
<td style="text-align: center;"><span class="math display">\[\lbrace表达式 \rbrace\]</span></td>
</tr>
</tbody>
</table>
<p>例子：<br />
<code>$$ f(x,y,z) = 3y^2z \left( 3+\frac{7x+5}{1+y^2} \right) $$</code><br />
显示：<br />
<span class="math display">\[ f(x,y,z) = 3y^2z \left( 3+\frac{7x+5}{1+y^2} \right) \]</span></p>
<h2 id="如何输入分数">4．如何输入分数</h2>
<p>通常使用 <code>\frac {分子} {分母}</code>命令产生一个分数\frac {分子} {分母}，分数可嵌套。<br />
便捷情况可直接输入 <code>\frac ab</code>来快速生成一个\frac ab。<br />
如果分式很复杂，亦可使用 分子 \over 分母 命令，此时分数仅有一层。</p>
<p>例子：</p>
<p><code>$$\frac{a-1}{b-1} \quad  and  \quad {a+1\over b+1}$$</code><br />
<span class="math display">\[\frac{a-1}{b-1} \quad   and   \quad {a+1\over b+1}\]</span></p>
<h2 id="如何输入开方">5．如何输入开方</h2>
<p>使用 <code>\sqrt [根指数，省略时为2] {被开方数}</code>命令输入开方。</p>
<p>例子：</p>
<p><code>$$\sqrt{2} \quad and \quad \sqrt[n]{3}$$</code><br />
<span class="math display">\[\sqrt{2} \quad and \quad \sqrt[n]{3}\]</span></p>
<h2 id="如何输入省略号">6．如何输入省略号</h2>
<p>数学公式中常见的省略号有两种，\ldots 表示与文本底线对齐的省略号，\cdots 表示与文本中线对齐的省略号。</p>
<p>例子：</p>
<p><code>$$f(x_1,x_2,\underbrace{\ldots}_{\rm ldots} ,x_n) = x_1^2 + x_2^2 + \underbrace{\cdots}_{\rm cdots} + x_n^2$$</code></p>
<p>显示：<br />
<span class="math display">\[f(x_1,x_2,\underbrace{\ldots}_{\rm ldots} ,x_n) = x_1^2 + x_2^2 + \underbrace{\cdots}_{\rm cdots} + x_n^2\]</span></p>
<h2 id="如何输入矢量">7．如何输入矢量</h2>
<p>使用 <code>\vec{矢量}</code>来自动产生一个矢量。也可以使用 <code>\overrightarrow</code>等命令自定义字母上方的符号。</p>
<p>例子：</p>
<p><code>$$\vec{a} \cdot \vec{b}=0$$</code></p>
<p>显示：<br />
<span class="math display">\[\vec{a} \cdot \vec{b}=0\]</span></p>
<p>例子：</p>
<p><code>$$\overleftarrow{xy} \quad and \quad \overleftrightarrow{xy} \quad and \quad \overrightarrow{xy}$$</code></p>
<p>显示：<br />
<span class="math display">\[\overleftarrow{xy} \quad and \quad \overleftrightarrow{xy} \quad and \quad \overrightarrow{xy}\]</span></p>
<h2 id="如何输入积分">8．如何输入积分</h2>
<p>使用 \int_积分下限^积分上限 {被积表达式} 来输入一个积分。</p>
<p>例子：</p>
<p><code>$$\int_0^1 {x^2} \,{\rm d}x$$</code></p>
<p>显示：<br />
<span class="math display">\[\int_0^1 {x^2} \,{\rm d}x\]</span></p>
<h2 id="如何输入极限运算">9．如何输入极限运算</h2>
<p>使用<code>\lim_{变量 \to 表达式} 表达式</code> 来输入一个极限。如有需求，可以更改 <code>\to</code> 符号至任意符号。</p>
<p>例子：</p>
<p><code>$$ \lim_{n \to +\infty} \frac{1}{n(n+1)} \quad and \quad \lim_{x\leftarrow{示例}} \frac{1}{n(n+1)} $$</code></p>
<p>显示：<br />
<span class="math display">\[ \lim_{n \to +\infty} \frac{1}{n(n+1)} \quad and \quad \lim_{x\leftarrow{示例}} \frac{1}{n(n+1)} \]</span></p>
<h2 id="如何输入累加累乘运算">10．如何输入累加、累乘运算</h2>
<p>使用 <code>\sum_{下标表达式}^{上标表达式} {累加表达式}</code>来输入一个累加。<br />
与之类似，使用 <code>\prod \bigcup \bigcap</code>来分别输入累乘、并集和交集。<br />
此类符号在行内显示时上下标表达式将会移至右上角和右下角。</p>
<p>例子：</p>
<p><code>$$\sum_{i=1}^n \frac{1}{i^2} \quad and \quad \prod_{i=1}^n \frac{1}{i^2} \quad and \quad \bigcup_{i=1}^{2} R$$</code></p>
<p>显示：<br />
<span class="math display">\[\sum_{i=1}^n \frac{1}{i^2} \quad and \quad \prod_{i=1}^n \frac{1}{i^2} \quad and \quad \bigcup_{i=1}^{2} R\]</span></p>
<h2 id="如何输入希腊字母">11．如何输入希腊字母</h2>
<p>输入 <code>\小写希腊字母英文全称</code>和<code>\首字母大写希腊字母英文全称</code>来分别输入小写和大写希腊字母。<br />
对于大写希腊字母与现有字母相同的，直接输入大写字母即可。</p>
<table>
<thead>
<tr class="header">
<th style="text-align: center;">输入</th>
<th style="text-align: center;">显示</th>
<th style="text-align: center;">输入</th>
<th style="text-align: center;">显示</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><code>$\alpha$</code></td>
<td style="text-align: center;"><span class="math inline">\(\alpha\)</span></td>
<td style="text-align: center;"><code>$A$</code></td>
<td style="text-align: center;"><span class="math inline">\(A\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\beta$</code></td>
<td style="text-align: center;"><span class="math inline">\(\beta\)</span></td>
<td style="text-align: center;"><code>$B$</code></td>
<td style="text-align: center;"><span class="math inline">\(B\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\gamma$</code></td>
<td style="text-align: center;"><span class="math inline">\(\gamma\)</span></td>
<td style="text-align: center;"><code>$\Gamma$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Gamma\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\delta$</code></td>
<td style="text-align: center;"><span class="math inline">\(\delta\)</span></td>
<td style="text-align: center;"><code>$\Delta$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Delta\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\epsilon$</code></td>
<td style="text-align: center;"><span class="math inline">\(\epsilon\)</span></td>
<td style="text-align: center;"><code>$E$</code></td>
<td style="text-align: center;"><span class="math inline">\(E\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\zeta$</code></td>
<td style="text-align: center;"><span class="math inline">\(\zeta\)</span></td>
<td style="text-align: center;"><code>$Z$</code></td>
<td style="text-align: center;"><span class="math inline">\(Z\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\eta$</code></td>
<td style="text-align: center;"><span class="math inline">\(\eta\)</span></td>
<td style="text-align: center;"><code>$H$</code></td>
<td style="text-align: center;"><span class="math inline">\(H\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\theta$</code></td>
<td style="text-align: center;"><span class="math inline">\(\theta\)</span></td>
<td style="text-align: center;"><code>$\Theta$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Theta\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\iota$</code></td>
<td style="text-align: center;"><span class="math inline">\(\iota\)</span></td>
<td style="text-align: center;"><code>$I$</code></td>
<td style="text-align: center;"><span class="math inline">\(I\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\kappa$</code></td>
<td style="text-align: center;"><span class="math inline">\(\kappa\)</span></td>
<td style="text-align: center;"><code>$K$</code></td>
<td style="text-align: center;"><span class="math inline">\(K\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\lambda$</code></td>
<td style="text-align: center;"><span class="math inline">\(\lambda\)</span></td>
<td style="text-align: center;"><code>$\Lambda$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Lambda\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\nu$</code></td>
<td style="text-align: center;"><span class="math inline">\(\nu\)</span></td>
<td style="text-align: center;"><code>$N$</code></td>
<td style="text-align: center;"><span class="math inline">\(N\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\mu$</code></td>
<td style="text-align: center;"><span class="math inline">\(\mu\)</span></td>
<td style="text-align: center;"><code>$M$</code></td>
<td style="text-align: center;"><span class="math inline">\(M\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\xi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\xi\)</span></td>
<td style="text-align: center;"><code>$\Xi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Xi\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$o$</code></td>
<td style="text-align: center;"><span class="math inline">\(o\)</span></td>
<td style="text-align: center;"><code>$O$</code></td>
<td style="text-align: center;"><span class="math inline">\(O\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\pi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\pi\)</span></td>
<td style="text-align: center;"><code>$\Pi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Pi\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\rho$</code></td>
<td style="text-align: center;"><span class="math inline">\(\rho\)</span></td>
<td style="text-align: center;"><code>$P$</code></td>
<td style="text-align: center;"><span class="math inline">\(P\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\sigma$</code></td>
<td style="text-align: center;"><span class="math inline">\(\sigma\)</span></td>
<td style="text-align: center;"><code>$\Sigma$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Sigma\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\tau$</code></td>
<td style="text-align: center;"><span class="math inline">\(\tau\)</span></td>
<td style="text-align: center;"><code>$T$</code></td>
<td style="text-align: center;"><span class="math inline">\(T\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\upsilon$</code></td>
<td style="text-align: center;"><span class="math inline">\(\upsilon\)</span></td>
<td style="text-align: center;"><code>$\Upsilon$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Upsilon\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\phi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\phi\)</span></td>
<td style="text-align: center;"><code>$\Phi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Phi\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\chi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\chi\)</span></td>
<td style="text-align: center;"><code>$X$</code></td>
<td style="text-align: center;"><span class="math inline">\(X\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>$\psi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\psi\)</span></td>
<td style="text-align: center;"><code>$\Psi$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Psi\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>$\omega$</code></td>
<td style="text-align: center;"><span class="math inline">\(\omega\)</span></td>
<td style="text-align: center;"><code>$\Omega$</code></td>
<td style="text-align: center;"><span class="math inline">\(\Omega\)</span></td>
</tr>
</tbody>
</table>
<h1 id="大括号和行标的使用">12.大括号和行标的使用<span id='jump'></span></h1>
<p>使用 <code>\left</code>和 <code>\right</code>来创建自动匹配高度的 (圆括号)，[方括号] 和 {花括号} 。<br />
在每个公式末尾前使用<code>\tag{行标}</code>来实现行标。<br />
例子：</p>
<pre><code>$$
f\left(
   \left[ 
     \frac{
       1+\left\{x,y\right\}
     }{
       \left(
          \frac{x}{y}+\frac{y}{x}
       \right)
       \left(u+1\right)
     }+a
   \right]^{3/2}
\right)
\tag{行标}
$$</code></pre>
<p>显示：</p>
<p><span class="math display">\[
f\left(
   \left[ 
     \frac{
       1+\left\{x,y\right\}
     }{
       \left(
          \frac{x}{y}+\frac{y}{x}
       \right)
       \left(u+1\right)
     }+a
   \right]^{3/2}
\right)
\tag{行标}
\]</span></p>
<p>小技巧：</p>
<ul>
<li><code>$\smash{\displaystyle\max_{0 \leq q \leq n-1}} f(q) \le n$</code> 显示：<br />
<span class="math inline">\(\smash{\displaystyle\max_{0 \leq q \leq n-1}} f(q) \le n\)</span></li>
<li><code>$f(x + \epsilon) \approx f(x) + f'(x) \epsilon + \mathcal{O}(\epsilon^2).$</code>, 显示:<br />
<span class="math inline">\(f(x + \epsilon) \approx f(x) + f&#39;(x) \epsilon + \mathcal{O}(\epsilon^2).\)</span></li>
<li>求导符号使用 <code>$\text{d}x$</code>, 即：<span class="math inline">\(\text{d}x\)</span></li>
</ul>
<p><a href="http://www.cnblogs.com/q735613050/p/7474449.html">Markdown公式（二）</a>以表格的形式列出了常用符号。</p>
<p>更多内容参见<a href="https://www.zybuluo.com/codeep/note/163962" class="uri">https://www.zybuluo.com/codeep/note/163962</a></p>
<h1 id="字体转换">字体转换</h1>
<p>若要对公式的某一部分字符进行字体转换，可以用 <code>{\字体 {需转换的部分字符}}</code> 命令，其中 <code>\字体</code> 部分可以参照下表选择合适的字体。一般情况下，公式默认为意大利体.</p>
<table>
<thead>
<tr class="header">
<th style="text-align: center;">输入</th>
<th style="text-align: center;">说明</th>
<th style="text-align: center;">显示实例</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><code>\rm</code></td>
<td style="text-align: center;">罗马体</td>
<td style="text-align: center;"><span class="math inline">\({\rm D}\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>\cal</code></td>
<td style="text-align: center;">花体</td>
<td style="text-align: center;"><span class="math inline">\(\cal D\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>\it</code></td>
<td style="text-align: center;">意大利体</td>
<td style="text-align: center;"><span class="math inline">\(\it D\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>\Bbb</code></td>
<td style="text-align: center;">黑板粗体</td>
<td style="text-align: center;"><span class="math inline">\(\Bbb D\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>\bf</code></td>
<td style="text-align: center;">粗体</td>
<td style="text-align: center;"><span class="math inline">\(\bf D\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>\mit</code></td>
<td style="text-align: center;">数学斜体</td>
<td style="text-align: center;"><span class="math inline">\(\mit D\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>\sf</code></td>
<td style="text-align: center;">等线体</td>
<td style="text-align: center;"><span class="math inline">\(\sf D\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>\scr</code></td>
<td style="text-align: center;">手写体</td>
<td style="text-align: center;"><span class="math inline">\(\scr D\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>\tt</code></td>
<td style="text-align: center;">打字机体</td>
<td style="text-align: center;"><span class="math inline">\(\tt D\)</span></td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>\frak</code></td>
<td style="text-align: center;">旧德式字体</td>
<td style="text-align: center;"><span class="math inline">\(\frak D\)</span></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>\boldsymbol</code></td>
<td style="text-align: center;">黑体</td>
<td style="text-align: center;"><span class="math inline">\(\boldsymbol{X}\)</span>, <span class="math inline">\(\boldsymbol{x}\)</span></td>
</tr>
</tbody>
</table>

<p><br/><br/><hr/><br/><br/></p>
		
<a id="cb_post_title_url" class="postTitle2" href="https://www.cnblogs.com/q735613050/p/7474449.html">Markdown公式（二）</a>

		</h1>
		<div class="clear"></div>
		<div class="postBody">
			
<div id="cnblogs_post_body" class="blogpost-body cnblogs-markdown">
    <p>参考资料<a href="https://gavin_nicholas.coding.me/archives/" class="uri">https://gavin_nicholas.coding.me/archives/</a></p>
<h2 id="如何输入括号和分隔符">1. 如何输入括号和分隔符</h2>
<h3 id="和-表示自己-表示-当要显示大号的括号或分隔符时要用-left-和-right-命令"><code>()</code> 、 <code>[]</code> 和 <code>|</code> 表示自己， <code>{}</code> 表示 <code>{}</code> 。当要显示大号的括号或分隔符时，要用 <code>\left</code> 和 <code>\right</code> 命令。</h3>
<p>例子：<code>$$f(x,y,z) = 3y^2z \left( 3+\frac{7x+5}{1+y^2} \right)$$</code> ,显示：<br />
<span class="math display">\[f(x,y,z) = 3y^2z \left( 3+\frac{7x+5}{1+y^2} \right)\]</span></p>
<h3 id="有时候要用left.或right.进行匹配而不显示本身">有时候要用<code>\left.</code>或<code>\right.</code>进行匹配而不显示本身。</h3>
<p>例子：<code>$$\left. \frac{ {\rm d}u}{ {\rm d}x} \right| _{x=0}$$</code>,显示：<br />
<span class="math display">\[\left. \frac{ {\rm d}u}{ {\rm d}x} \right| _{x=0}\]</span></p>
<h2 id="偏导">1.1 偏导</h2>
<p><code>$$\frac{\partial^{2}y}{\partial x^{2}}$$</code><br />
<span class="math display">\[\frac{\partial^{2}y}{\partial x^{2}}\]</span></p>
<h2 id="运算符">2. 运算符：</h2>
<table>
<thead>
<tr class="header">
<th style="text-align: center;">关系运算符</th>
<th style="text-align: center;">markdown语言</th>
<th style="text-align: center;">集合运算符</th>
<th style="text-align: center;">markdown语言</th>
<th style="text-align: center;">对数运算符</th>
<th style="text-align: center;">markdown语言</th>
<th style="text-align: center;">戴帽符号</th>
<th style="text-align: center;">markdown语言</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\pm\)</span></td>
<td style="text-align: center;"><code>$\pm$</code></td>
<td style="text-align: center;"><span class="math inline">\(\emptyset\)</span></td>
<td style="text-align: center;"><code>$\emptyset$</code></td>
<td style="text-align: center;"><span class="math inline">\(\log\)</span></td>
<td style="text-align: center;"><code>$\log$</code></td>
<td style="text-align: center;"><span class="math inline">\(\hat{y}\)</span></td>
<td style="text-align: center;"><code>$\hat{y}$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\times\)</span></td>
<td style="text-align: center;"><code>$\times$</code></td>
<td style="text-align: center;"><span class="math inline">\(\in\)</span></td>
<td style="text-align: center;"><code>$\in$</code></td>
<td style="text-align: center;"><span class="math inline">\(\lg\)</span></td>
<td style="text-align: center;"><code>$\lg$</code></td>
<td style="text-align: center;"><span class="math inline">\(\check{y}\)</span></td>
<td style="text-align: center;"><code>$\check{y}$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\div\)</span></td>
<td style="text-align: center;"><code>$\div$</code></td>
<td style="text-align: center;"><span class="math inline">\(\notin\)</span></td>
<td style="text-align: center;"><code>$\notin$</code></td>
<td style="text-align: center;"><span class="math inline">\(\ln\)</span></td>
<td style="text-align: center;"><code>$\ln$</code></td>
<td style="text-align: center;"><span class="math inline">\(\breve{y}\)</span></td>
<td style="text-align: center;"><code>$\breve{y}$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\mid\)</span></td>
<td style="text-align: center;"><code>$\mid$</code></td>
<td style="text-align: center;"><span class="math inline">\(\subset\)</span></td>
<td style="text-align: center;"><code>$\subset$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\nmid\)</span></td>
<td style="text-align: center;"><code>$\nmid$</code></td>
<td style="text-align: center;"><span class="math inline">\(\supset\)</span></td>
<td style="text-align: center;"><code>$\supset$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\cdot\)</span></td>
<td style="text-align: center;"><code>$\cdot$</code></td>
<td style="text-align: center;"><span class="math inline">\(\subseteq\)</span></td>
<td style="text-align: center;"><code>$\subseteq$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\circ\)</span></td>
<td style="text-align: center;"><code>$\circ$</code></td>
<td style="text-align: center;"><span class="math inline">\(\supseteq\)</span></td>
<td style="text-align: center;"><code>$\supseteq$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\ast\)</span></td>
<td style="text-align: center;"><code>$\ast$</code></td>
<td style="text-align: center;"><span class="math inline">\(\bigcap\)</span></td>
<td style="text-align: center;"><code>$\bigcap$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\bigodot\)</span></td>
<td style="text-align: center;"><code>$\bigodot$</code></td>
<td style="text-align: center;"><span class="math inline">\(\bigcup\)</span></td>
<td style="text-align: center;"><code>$\bigcup$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\bigotimes\)</span></td>
<td style="text-align: center;"><code>$\bigotimes$</code></td>
<td style="text-align: center;"><span class="math inline">\(\bigvee\)</span></td>
<td style="text-align: center;"><code>$\bigvee$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\bigoplus\)</span></td>
<td style="text-align: center;"><code>$\bigoplus$</code></td>
<td style="text-align: center;"><span class="math inline">\(\bigvee\)</span></td>
<td style="text-align: center;"><code>$\bigvee$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\leq\)</span></td>
<td style="text-align: center;"><code>$\leq$</code></td>
<td style="text-align: center;"><span class="math inline">\(\bigwedge\)</span></td>
<td style="text-align: center;"><code>$\bigwedge$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\geq\)</span></td>
<td style="text-align: center;"><code>$\geq$</code></td>
<td style="text-align: center;"><span class="math inline">\(\biguplus\)</span></td>
<td style="text-align: center;"><code>$\biguplus$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\neq\)</span></td>
<td style="text-align: center;"><code>$\neq$</code></td>
<td style="text-align: center;"><span class="math inline">\(\bigsqcup\)</span></td>
<td style="text-align: center;"><code>$\bigsqcup$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\approx\)</span></td>
<td style="text-align: center;"><code>$\approx$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\equiv\)</span></td>
<td style="text-align: center;"><code>$\equiv$</code></td>
<td style="text-align: center;"><span class="math inline">\(\ll\)</span></td>
<td style="text-align: center;"><code>$\ll$</code></td>
<td style="text-align: center;"><span class="math inline">\(\gg\)</span></td>
<td style="text-align: center;"><code>$\gg$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\sum\)</span></td>
<td style="text-align: center;"><code>$\sum$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\prod\)</span></td>
<td style="text-align: center;"><code>$\prod$</code></td>
<td style="text-align: center;"><span class="math inline">\(\sim\)</span></td>
<td style="text-align: center;"><code>$\sim$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\coprod\)</span></td>
<td style="text-align: center;"><code>$\coprod$</code></td>
<td style="text-align: center;"><span class="math inline">\(\backsim\)</span></td>
<td style="text-align: center;"><code>$\backsim$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\prec\)</span> <span class="math inline">\(\preceq\)</span> <span class="math inline">\(\succ\)</span> <span class="math inline">\(\succeq\)</span></td>
<td style="text-align: center;"><code>$\prec$ $\preceq$ $\succ$ $\succeq$</code></td>
<td style="text-align: center;"></td>
</tr>
</tbody>
</table>
<hr />
<hr />
<table>
<thead>
<tr class="header">
<th style="text-align: center;">三角运算符</th>
<th style="text-align: center;">markdown语言</th>
<th style="text-align: center;">微积分运算符</th>
<th style="text-align: center;">markdown语言</th>
<th style="text-align: center;">逻辑运算符</th>
<th style="text-align: center;">markdown语言</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\bot\)</span></td>
<td style="text-align: center;"><code>$\bot$</code></td>
<td style="text-align: center;"><span class="math inline">\(\prime\)</span></td>
<td style="text-align: center;"><code>$\prime$</code></td>
<td style="text-align: center;"><span class="math inline">\(\because\)</span></td>
<td style="text-align: center;"><code>$\because$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\angle\)</span></td>
<td style="text-align: center;"><code>$\angle$</code></td>
<td style="text-align: center;"><span class="math inline">\(\int\)</span></td>
<td style="text-align: center;"><code>$\int$</code></td>
<td style="text-align: center;"><span class="math inline">\(\therefore\)</span></td>
<td style="text-align: center;"><code>$\therefore$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(30^\circ\)</span></td>
<td style="text-align: center;"><code>$30^\circ$</code></td>
<td style="text-align: center;"><span class="math inline">\(\iint\)</span></td>
<td style="text-align: center;"><code>$\iint$</code></td>
<td style="text-align: center;"><span class="math inline">\(\forall\)</span></td>
<td style="text-align: center;"><code>$\forall$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\sin\)</span></td>
<td style="text-align: center;"><code>$\sin$</code></td>
<td style="text-align: center;"><span class="math inline">\(\iiint\)</span></td>
<td style="text-align: center;"><code>$\iiint$</code></td>
<td style="text-align: center;"><span class="math inline">\(\exists\)</span></td>
<td style="text-align: center;"><code>$\exists$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\cos\)</span></td>
<td style="text-align: center;"><code>$\cos$</code></td>
<td style="text-align: center;"><span class="math inline">\(\iiiint\)</span></td>
<td style="text-align: center;"><code>$\iiiint$</code></td>
<td style="text-align: center;"><span class="math inline">\(\not=\)</span></td>
<td style="text-align: center;"><code>$\not=$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\tan\)</span></td>
<td style="text-align: center;"><code>$\tan$</code></td>
<td style="text-align: center;"><span class="math inline">\(\oint\)</span></td>
<td style="text-align: center;"><code>$\oint$</code></td>
<td style="text-align: center;"><span class="math inline">\(\not&gt;\)</span></td>
<td style="text-align: center;"><code>$\not&gt;$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\cot\)</span></td>
<td style="text-align: center;"><code>$\cot$</code></td>
<td style="text-align: center;"><span class="math inline">\(\lim\)</span></td>
<td style="text-align: center;"><code>$\lim$</code></td>
<td style="text-align: center;"><span class="math inline">\(\not\subset\)</span></td>
<td style="text-align: center;"><code>$\not\subset$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\sec\)</span></td>
<td style="text-align: center;"><code>$\sec$</code></td>
<td style="text-align: center;"><span class="math inline">\(\infty\)</span></td>
<td style="text-align: center;"><code>$\infty$</code></td>
<td style="text-align: center;"></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\csc\)</span></td>
<td style="text-align: center;"><code>$\csc$</code></td>
<td style="text-align: center;"><span class="math inline">\(\nabla\)</span></td>
<td style="text-align: center;"><code>$\nabla$</code></td>
<td style="text-align: center;"></td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr class="header">
<th style="text-align: center;">箭头符号</th>
<th style="text-align: center;">markdown语言</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\uparrow\)</span></td>
<td style="text-align: center;"><code>$\uparrow$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\downarrow\)</span></td>
<td style="text-align: center;"><code>$\downarrow$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\Uparrow\)</span></td>
<td style="text-align: center;"><code>$\Uparrow$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\Downarrow\)</span></td>
<td style="text-align: center;"><code>$\Downarrow$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\rightarrow\)</span></td>
<td style="text-align: center;"><code>$\rightarrow$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\leftarrow\)</span></td>
<td style="text-align: center;"><code>$\leftarrow$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\Rightarrow\)</span></td>
<td style="text-align: center;"><code>$\Rightarrow$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\Leftarrow\)</span></td>
<td style="text-align: center;"><code>$\Leftarrow$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\longrightarrow\)</span></td>
<td style="text-align: center;"><code>$\longrightarrow$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\longleftarrow\)</span></td>
<td style="text-align: center;"><code>$\longleftarrow$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(\Longrightarrow\)</span></td>
<td style="text-align: center;"><code>$\Longrightarrow$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\Longleftarrow\)</span></td>
<td style="text-align: center;"><code>$\Longleftarrow$</code></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><span class="math inline">\(f: {\mathbf x_t} \mapsto {\mathbf y_t}\)</span></td>
<td style="text-align: center;"><code>$f: {\mathbf x_t} \mapsto {\mathbf y_t}$</code></td>
</tr>
<tr class="even">
<td style="text-align: center;"><span class="math inline">\(\Longleftrightarrow\)</span></td>
<td style="text-align: center;"><code>\Longleftrightarrow</code></td>
</tr>
</tbody>
</table>
<p>更多关于箭头的符号见：<a href="https://blog.csdn.net/liyuanbhu/article/details/51473886">MathJax 支持的 Latex 符号总结(各种箭头符号)</a></p>
<hr />
<h1 id="特殊符号">特殊符号</h1>
<ul>
<li><span class="math inline">\(\boldsymbol{\hat y} = \boldsymbol{W} \boldsymbol{x}\)</span> 的输入<br />
代码：</li>
</ul>
<pre class="md"><code>$\boldsymbol{\hat y} = \boldsymbol{W} \boldsymbol{x}$</code></pre>
<ul>
<li><span class="math inline">\(\ell_p\)</span> 范数: <code>$\ell_p$</code></li>
</ul>
<p>对于一些特殊的数学符号可以使用 <code>\operatorname{}</code> 或者 <code>\text{}</code> 来进行转换，如：<code>$\text{cov}$</code> 和 <code>$\operatorname{s.t.}$</code> 便显示为：<span class="math inline">\(\text{cov}\)</span> 和 <span class="math inline">\(\operatorname{s.t.}\)</span></p>
<p>还有：</p>
<pre class="md"><code>$A \xrightarrow{f} B \; a \; \bot b \; \overset{def}{=}$ </code></pre>
<p><span class="math inline">\(A \xrightarrow{f} B \; a \; \bot b \; \overset{def}{=}\)</span></p>
<pre class="md"><code>$$
 \underset{x\in S\subseteq X}{\operatorname{arg\,max}}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}.   
$$</code></pre>
<p><span class="math display">\[
 \underset{x\in S\subseteq X}{\operatorname{arg\,max}}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}.   
\]</span></p>
<pre class="md"><code>$$
\operatorname*{\arg\max}_{x\in S\subseteq X}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}.   
$$</code></pre>
<p><span class="math display">\[
\operatorname*{\arg\max}_{x \in S \subseteq X}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}.   
\]</span></p>
<ul>
<li>更多特殊符号可以访问：<a href="http://detexify.kirelabs.org/classify.html">Detexify</a></li>
<li>更多关于数学符号的内容，参 考 <a href="https://github.com/q735613050/filezoo/blob/master/Symbols.pdf">L ATEX Mathematical Symbols</a>
<ul>
<li>关于数学符号的解释见 <a href="https://en.wikipedia.org/wiki/List_of_mathematical_symbols_by_subject">List of mathematical symbols by subject</a></li>
</ul></li>
<li>更多精彩参考<a href="http://www.cnblogs.com/q735613050/p/7253073.html" class="uri">http://www.cnblogs.com/q735613050/p/7253073.html</a></li>
</ul>

</div>

</body>
</html>